﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Relayindex.aspx.cs" Inherits="RaceList.activity.relay.Relayindex" %>
<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8" />
        <title>随便走</title>
        <meta name="keywords" content="">
        <meta name="description" content="">
        <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1,minimum-scale=1,user-scalable=no;" />
        <meta http-equiv="cache-control" content="no-cache">
        <link href="style/index.css" rel="stylesheet" />
    </head>
    <body>
        <% if (Request.IsLocal)
           { %>
            <%= JsonConvert.SerializeObject(SessionHelp.CycleId) %>
            <%= JsonConvert.SerializeObject(SessionHelp.UserData) %>
            <%= JsonConvert.SerializeObject(SessionHelp.UserChengji) %>
        <% } %>

        <%
           string paiHangBangUrl = "Relayresult.aspx?" + Parameters.relay + "=";
           string chongxingameUrl = "Relaygame.aspx?" + Parameters.relay + "=" + Parameters.first + "&" + Parameters.cycle + "=" + SessionHelp.CycleId;
        %>
        <section id="web_wrap">
            <!-- 页面框架 -->
            <div class="container">
                <div class="bg_box">
                    <a href="Relayrule.aspx" class="rule">游戏规则</a>
                    <a href="<%= chongxingameUrl %>" class="gamestart">开始游戏</a>

                    <div class="rule_text">
                        <p>1、1-3名<em>apple watch</em></p>
                        <p>2、4-6名京东<em>500元</em>购物卡</p>
                        <p>3、7-10名一号店<em>300元</em>购物卡</p>
                    </div>

                    <div class="ranking">
                        <div class="ranking_title">排 行 榜</div>

                        <div class="namebox">
                            <!-- nameline -->
                            <%
                                int num = Paihangs.Count();
                                foreach (Paihang item in Paihangs)
                                {
                                    int index = Paihangs.IndexOf(item) + 1;
                                    int classNum = 0;
                                    if (index > 3)
                                        classNum = 0;
                                    else
                                        classNum = index;
                            %>
                                <div class="nameline" <%= index - 1 == 0 ? "style='margin-top: 60px;'" : "" %>>
                                    <a href="<%= paiHangBangUrl + item.RelayId %>">
                                        <div class="num<%= classNum == 0 ? "" : classNum.ToString() %>"><%= index %></div>
                                        <img src="<%= string.IsNullOrEmpty(item.Headimgurl) ? "images/user.jpg" : item.Headimgurl %>" alt="微信头像">
                                        <div class="name"><%= item.Nickname.SubHtml(8) %></div>
                                        <div class="km"><%= item.SumScore %>m</div>
                                        <div class="clear"></div>
                                    </a>
                                </div>

                            <% } %>
                            <% if (num == 0)
                               { %>
                                <div class="nameline" style="margin-top: 60px;">
                                    <div class="name">好机会哦,快来抢头条!</div>
                                </div>
                            <% } %>
                        </div>
                    </div>

                    <div class="clear"></div>
                </div>

                <div class="footer">
                    <p>Copyright © 2014-2015</p>
                    <p>深圳感知网络有限公司 版权所有</p>
                </div>

            </div>

        </section>



    </body>
</html>
<script src="js/jquery-1.9.1.min.js"></script>
<script src="js/main.js"></script>
<script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
<script>
    $(function() {
        //1.config
        wx.config({
            debug: false,
            appId: "<%= WxConfig.appid %>",
            timestamp: "<%= WxConfig.timestamp %>",
            nonceStr: "<%= WxConfig.noncestr %>",
            signature: "<%= WxConfig.signature %>",
            jsApiList: [
                'checkJsApi',
                'onMenuShareTimeline',
                'onMenuShareAppMessage',
                'onMenuShareQQ',
                'onMenuShareWeibo'
            ] // 必填，需要使用的JS接口列表，所有JS接口列表见附录2
        });
        wx.ready(function() {
            wx.hideOptionMenu();
        });
    });
</script>